import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;


public class BuildMenu extends Menu{
	
	
	private int test;
	private boolean visible;
	private BufferedImage build_menu;
	
	private MenuButton sCardButton;
	private MenuButton settlementButton;
	private MenuButton roadButton;
	private MenuButton cityButton;
	
	public BuildMenu(SOCApplet applet){
		sCardButton = new MenuButton("sCardButton", 20, 415, 75, 75, new SCardMenu(applet));
		settlementButton = new MenuButton("settlementButton", 98, 496, 75, 75, new SettlementMenu(applet));
		roadButton = new MenuButton("roadButton", 20, 495, 75, 75, new RoadMenu(applet));
		cityButton = new MenuButton("cityButton", 98, 415, 75, 75, new CityMenu(applet));
		
		applet.addToClickable(sCardButton);
		applet.addToClickable(settlementButton);
		applet.addToClickable(roadButton);
		applet.addToClickable(cityButton);
		
		//starts hidden
		visible = false;
		try {
			build_menu = ImageIO.read(new File("build_menu.png"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void activate(String buttonName) {
		visible = !visible;
	}

	@Override
	public void drawSelf(Graphics g) {
		if(visible){
			g.drawImage(build_menu, 10, 405, null);
		}
	}
	
	public void checkOverlaps(int x, int y) {
		
	}
}
